body {
  margin: 5px 10px 10px;
}

h1 {
  color: #53637D;
  font: 26px/1.2 Helvetica, sans-serif;
  font-size: 200%;
  margin: 0;
  padding-bottom: 4px;
  text-shadow: white 0 1px 2px;
}

div[role='main'] {
  border-radius: 5px;
  background: #EAEEF3;
  font: 14px/1 Arial,Sans Serif;
  padding: 10px;
  width: 563px;
  box-shadow: inset 0px 2px 5px rgba(0,0,0,0.5);
  overflow: hidden;
  transition: background-color 0.5s ease-out;
}

div[role='main'].incognito {
  background: #496281 url('') no-repeat 533px bottom;
}

form {
  transition: transform 0.25s ease;
  width: 563px;
}

form.offscreen {
  transform: translateX(-600px);
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  position: relative;
}

legend {
  position: absolute;
  left: -999em;
}

form > fieldset {
  border-radius:  5px;
  border: 1px solid transparent;
  padding: 10px 10px 10px 30px;
  margin: 5px 0;
  transition: all 0.5s ease;
}

form > fieldset:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(0,0,0,0.1);
}

form > fieldset.active {
  background: rgba(255,255,255,0.25);
  border-color: rgba(0,0,0,0.25);
}

form > fieldset > input {
  margin-left:  -20px;
}

section {
  margin: 5px 0 0;
}

section fieldset:not(:first-child):not(:last-child) {
  max-height: 1.6em;
  overflow: hidden;
  transition: all 0.5s ease;
}

section.single fieldset:not(:first-child):not(:last-child) {
  max-height: 0px;
}

section fieldset:last-child {
  margin-top: 5px;
}

section fieldset:last-child label {
  display: block;
}

section fieldset:last-child textarea {
  width: 412px;
}

section > fieldset {
  position: relative;
  padding-left: 60px;
}

section > fieldset > legend {
  left: 0;
  top: 4px;
  width: 53px;
  text-align: right;
}

input[type='url']:invalid:not(:active):not(:focus) {
  border-color: rgba(255,0,0,0.5);
  background: rgba(255,0,0,0.25);
}

input:invalid:not(:active):not(:focus):after {
  content: "This isn't a valid URL!";
  display:block;
}

input[type="checkbox"] {
  margin: 5px 0 5px 35px;
}

input[type="text"] {
  width: 200px;
  margin: 0 10px 0 0;
}

input.port {
  width: 50px;
  margin: 2px 10px 0 5px;
}

section label,
section legend {
  color:  #999;
  transition: color 0.5s ease;
}

.incognito section label,
.incognito section legend {
  color:  #BBB;
}

.active section label,
.active section legend,
form > fieldset > label  {
  color:  #000;
  transition: color 0.5s ease;
}

.incognito .active section label,
.incognito .active section legend,
.incognito form > fieldset > label {
  color: #FFF;
}

input[type="submit"],
button {
  border-radius: 2px;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
  -webkit-user-select: none;
  background: -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
  border: 1px solid #AAA;
  color: #444;
  margin-bottom: 0;
  min-width: 4em;
  padding: 3px 12px;
  margin-top: 0;
  font-size: 1.1em;
}

.overlay {
  display: block;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 500px;
  padding: 20px;
  margin: -80px 0 0 -270px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 5px;
  color: #FFF;
  font: 1.5em/1.2 Helvetica Neue, sans-serif;
  transform: scale(0);
  transition: all 1.0s ease;
}

.overlay a {
  color:  #FFF;
}

.overlay.visible {
  opacity: 1;
  transform: scale(1);
}
